home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19941221-19950208
/
000450_news@columbia.edu_Tue Feb 7 17:20:03 1995.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
2KB
Received: from apakabar.cc.columbia.edu by watsun.cc.columbia.edu with SMTP id AA22008
(5.65c+CU/IDA-1.4.4/HLK for <kermit.misc@watsun.cc.columbia.edu>); Tue, 7 Feb 1995 12:20:24 -0500
Received: by apakabar.cc.columbia.edu id AA03810
(5.65c+CU/IDA-1.4.4/HLK for kermit.misc@watsun); Tue, 7 Feb 1995 12:20:19 -0500
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: C-kermit maximum wait time
Date: 7 Feb 1995 17:20:03 GMT
Organization: Columbia University
Lines: 27
Message-Id: <3h8a43$3m5@apakabar.cc.columbia.edu>
References: <3h63lo$svd@nuhou.aloha.net>
Nntp-Posting-Host: watsun.cc.columbia.edu
Apparently-To: kermit.misc@watsun.cc.columbia.edu
In article <3h63lo$svd@nuhou.aloha.net>,
Timothy Newsham <newsham@hookomo.aloha.net> wrote:
>I have a script that waits for input on the serial line,
>writes to a file, runs a program, then sends output. The program
>needs to wait for long periods of time sometimes. What is
>the maximum value I can use to wait with? It seems that
>the program breaks out of the wait after about a day or so
>with the current values I'm using.
>
It depends on "sizeof int" in the C compiler that generated your
version of C-Kermit. The INPUT timeout is a signed integer, so
the maximum value would be two raised to the <number-of-bits-in-
an-integer>'th power, minus 1. So for 16-bit integers, it would
be 65535 seconds, which is indeed only about 76% of a day. For
32-bit integers, of course, the maximum timeout would be way bigger.
>Since I quit if the wait
>fails the script stops running. (The reason I quit if the
>wait fails is so that a ^C at the console will kill the script,
>otherwise the only way I have of killing the script is sending
>a shutdown command over the serial line).
>
There's always a way. For example, you could simply make a loop
that executes infinitely, and waits for an hour, or 12 hours, or
whatever, until the input arrives.
- Frank